#
# Copyright (C) [2024] Xingyun Integrated Circuit, Inc.
#
# GreenCode was a private technology asset of Xingyun Integrated Circuit， Inc （Confidential）
# Author: Shawn.Tan
# Date: 2025.10.28
#
# History: Initial Version 2025.10.28
#
#
from VectorTestSequence import VectorLoadStoreTestSequence
from gpgpu.EnvGPGPU import EnvGPGPU
from gpgpu.GenThreadGPGPU import GenThreadGPGPU


# This test verifies that indexed load and store instructions can be generated and executed
# successfully.
class MainSequence(VectorLoadStoreTestSequence):
    def __init__(self, aGenThread, aName=None):
        super().__init__(aGenThread, aName)

        self._mInstrList = (
            "VLOXEI16.V##CALM",
            "VLOXEI32.V##CALM",
            "VLOXEI64.V##CALM",
            "VLOXEI8.V##CALM",
            "VLUXEI16.V##CALM",
            "VLUXEI32.V##CALM",
            "VLUXEI64.V##CALM",
            "VLUXEI8.V##CALM",
            "VSOXEI16.V##CALM",
            "VSOXEI32.V##CALM",
            "VSOXEI64.V##CALM",
            "VSOXEI8.V##CALM",
            "VSUXEI16.V##CALM",
            "VSUXEI32.V##CALM",
            "VSUXEI64.V##CALM",
            "VSUXEI8.V##CALM",
        )

    # Return a list of test instructions to randomly choose from.
    def _getInstructionList(self):
        return self._mInstrList


MainSequenceClass = MainSequence
GenThreadClass = GenThreadGPGPU
EnvClass = EnvGPGPU
